﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Battle
{
    public class FieldPVPBattleOver: IBattleOver
    {
        public BattleType GetBattleType()
        {
            return BattleType.FIELD_PVP;
        }

        OnBattleResult onResult;
        public FieldPVPBattleOver(OnBattleResult onResult)
        {
            this.onResult = onResult;
        }

        public void Excute()
        {
            StaticData.isLastBattleWin = StaticData.sidePvpMv.winPlayerName == StaticData.playerData.name;
            End();
        }

        public void End()
        {
            if (onResult != null)
            {
                onResult( StaticData.isLastBattleWin);
            }
        }
    }
}
